package com.traffic.user;



import com.ainsurtech.service.AbstractService;
import com.traffic.repository.login.UserRepository;
import com.traffic.entity.User;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class userServiceImpl extends AbstractService implements UserService {


	@Autowired
	private UserRepository repository;

	@Override
	@Transactional(rollbackFor = Exception.class, timeout = 30, propagation = Propagation.REQUIRED)
	public User findUserByNameAndPassword(String name, String password) throws ClassNotFoundException, Exception {
		
		return repository.findByNameAndPassword(name,password);
	}

}
